<!--Begin Include: prodlist.txt--> <!--This file is used in the following format templates: hitlist.htm specials.htm This file is used to provide a list view of records found using the -find command. The CDML keywords to note here are: FMPro - Directs the URL to the FileMaker Web Companion. -token - This is token value which contains the record ID of the customers order record in the Orders.fp3 database. It must be passed from page to page by assigning it the value of the token [FMP-currenttoken] passed from the previous document. -db - Specifies the database to be used. -format - Specifies the format file to be used as a reply. -lay - The layout used when processing the request. -new - This is the action keyword that creates a new record in the OrderedItems.fp3 database. This item is passed as the name value of the image input tag in the last row of the following table. The "Product ID" and "Order ID" input parameters are simply field names. This information is being supplied by the found set of records so there is no need for them to be visible to the client. The [FMP-record] object will repeat everything between it and the [/FMP-record] tag for each record found in the database. All the value substitutions are supplied by each record in turn. In this way, a form is generated for each record allowing each item to be purchased separately. Notice that the Order ID field gets substituted with the value of the current token [FMP-currenttoken]. Since OrderedItems.fp3 is related by this field to the Orders.fp3 database where the order record resides, each record added will automatically be related to the clients record.--> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0" WIDTH="495"> <!--The rows of the following table define the visible items on the list. The first cell utilizes the [FMP-if] construct to display an image only if the field Special contains the value "Yes". This technique can be used to highlight items you want to bring to the customer's attention. The second cell is an input tag where the customer can specify the quantity of their purchase. The next cell uses the [FMP-linkrecid] tag to create a link to the corresponding record and uses the field "name" to provide the visible text. The format file detail.htm is specified which will provide a detailed listing when the customer clicks on the link. It also includes some JavaScriptâ„¢ which displays some text at the bottom of the clients browser window. The next two cells simply display the fields Artist and Formatted Price using the [FMP-field] replacement tag. These tags will be replaced by the contents of these fields from the corresponding record. The last item is simply an input tag of type image which provides a button on which a customer can click to submit the form (purchase the item).--> [FMP-record] <TR> <TD ALIGN=LEFT VALIGN=MIDDLE WIDTH="35"> [FMP-if:Special.eq.Yes]<IMG SRC="images/special1.gif" ALT="Special!" ALIGN=TOP WIDTH="29" HEIGHT="24" BORDER="0">[/FMP-if] </TD> <TD ALIGN=LEFT VALIGN=MIDDLE WIDTH="40"> <FORM METHOD="POST" ACTION="FMPro" NAME="prodform[FMP-field:ID]"> <INPUT TYPE="hidden" NAME="-token" VALUE="[FMP-currenttoken]"> <INPUT TYPE="hidden" NAME="-db" VALUE="OrderedItems.fp3"> <INPUT TYPE="hidden" NAME="-format" VALUE="cartok.htm"> <INPUT TYPE="hidden" NAME="-lay" VALUE="CGI"> <INPUT TYPE="hidden" NAME="Product ID" VALUE="[FMP-field:ID]"> <INPUT TYPE="hidden" NAME="Order ID" VALUE="[FMP-currenttoken]"> <INPUT TYPE="hidden" NAME="-new" VALUE=""> <INPUT TYPE="text" SIZE="2" NAME="Quantity" VALUE="1"> </FORM> </TD> <TD ALIGN=LEFT VALIGN=MIDDLE WIDTH="165"> <B><A HREF="[FMP-linkrecid:layout=CGI, format=detail.htm]" onMouseOver="self.status='View Detail.'; return true">[FMP-field:name]</A></B> </TD> <TD ALIGN=LEFT VALIGN=MIDDLE WIDTH="135"> [FMP-field:Artist] </TD> <TD ALIGN=LEFT VALIGN=MIDDLE WIDTH="80"> [FMP-field:Formatted Price] </TD> <TD ALIGN=LEFT VALIGN=MIDDLE WIDTH="40"> <A HREF="javascript:document.prodform[FMP-field:ID].submit()" onMouseOver="return setimg('buy.[FMP-field:ID]',true)" onMouseOut="return setimg('buy.[FMP-field:ID]',false)"><IMG SRC="images/buy1.gif" NAME="buy.[FMP-field:ID]" ALT="Buy" WIDTH="24" HEIGHT="24" BORDER="0"></A> </TD> </TR> [/FMP-record] </TABLE> <!--Again, a "Go Back" button is provided at the bottom of the page for the convenience of the client. Here, however, we do not need to worry about hiding it from the customer the first time, because the previous page (search.htm) won't create a new record (see search.htm for more information). For further investigation of the solution, proceed to the navsearch.txt file located in the "includes" folder in this directory.--> <P ALIGN="center"><A HREF="javascript:history.go(-1)" onMouseOver="return setimg('back',true)" onMouseOut="return setimg('back',false)"><IMG SRC="images/back1.gif" NAME="back" ALT="Go Back" ALIGN=BOTTOM WIDTH="41" HEIGHT="41" BORDER="0"></A><BR><BR> <A HREF="http://www.claris.com/filemakerpro/"><IMG SRC="../images/powered_by_fmp.gif" ALT="Powered by FileMaker Pro" ALIGN=BOTTOM WIDTH="114" HEIGHT="43" BORDER="0"></A></P> <!--End Include: prodlist.txt-->